package constructor02;

public class Demo {
    public static void main(String[] args) {
        //只要new对象就一定会调用构造方法
        //new Person("无忌",18,"男")会调用对应的构造方法
        //在构造方法内部将传过来的值赋值给了成员变量
        Person person = new Person("无忌", 18, "男");
        System.out.println(person.getName() + "   " + person.getGender() + "    " + person.getAge());;
    }
}
